import javax.swing.JOptionPane;

/**
 * 
 *is the control class of update book Gui.
 */
public class RemoveBFCControl 
{
	/** array of strings */
	public String [] remove_bookFC;
	
	/**
	 * gets the book's serial and send it forward/
	 */
	public void removeBFC()
	{
		remove_bookFC = new String[3];
		remove_bookFC[0]=Main.gusers.id;
		remove_bookFC[1]="remove_from_catalog";
		remove_bookFC[2]=Main.removeFromCG.serial123;
		Main.log.connection.accept("removefc");
		while(Main.log.flag==false);
		Main.log.flag=false;
		if (ChatClient.getRs().equals("OK"))
			JOptionPane.showMessageDialog(null," The Book was removed from Catalog (Not from DataBase) ","INFO",JOptionPane.INFORMATION_MESSAGE);
		else 
			JOptionPane.showMessageDialog(null," The Book has not removed from Catalog ","INFO",JOptionPane.INFORMATION_MESSAGE);
		Main.searchBookG = new SearchBookGUI();
		Main.searchBookC = new SearchBookCONTROL();
		Main.removeFromCG.setEnabled(false);
		Main.removeFromCG.setVisible(false);
		Main.log.frame.setSize(730, 560);
		Main.log.frame.add(Main.searchBookG);
		Main.searchBookG.setEnabled(true);
		Main.searchBookG.setVisible(true);
		
	}

}
